home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 14295 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.6 KB  |  33 lines

  1. Newsgroups: comp.lang.c
  2. Path: netcom.com!smryan
  3. From: smryan@netcom.com (@#$%!?!)
  4. Subject: Re: How to use assert( )
  5. Message-ID: <smryanDps8pF.87t@netcom.com>
  6. Organization: The Programmer formerly known as S M Ryan
  7. X-Newsreader: TIN [version 1.2 PL1]
  8. References: <4kc3k7$dur@orion.cybercom.net> <316be48b.3354928@news.netvision.net.il> <4kiirb$hll@sparcserver.lrz-muenchen.de> <smryanDpqBv7.E56@netcom.com> <dpmikese.14.005EA7C0@ingr.com>
  9. Date: Sat, 13 Apr 1996 04:05:39 GMT
  10. Sender: smryan@netcom2.netcom.com
  11.  
  12. : >It is preferable to have the program fail mysteriously for the customer
  13. : >with possibly the only opportunity to diagnose it gone.
  14.  
  15. : Not if you build in user-level debugging.  For instance, your code could
  16. : check for the existence of an environment variable defined in the user's
  17. : environment - if it's there, you could write debug info somewhere that 
  18.  
  19. So you write a separate "check" routine to duplicate the functionality of
  20. "assert" except it is turned off by a secret feature instead of a #define?
  21.  
  22. It still leaves the issue that what do you want to do if the program fails:
  23. Say mea culpa and write out enough information that the seller might
  24. actually track down the problem, or let the customer fume and fret over
  25. a mysteriously broken product? And just how easy is it duplicate (and
  26. identify) a bug in an interactive product?
  27.  
  28. -- 
  29. The Queen, amused, in quiet power,         | smryan@netcom.com  PO Box 1563
  30. will draw the son to darkenned bower.      |          Cupertino, California
  31. Her face is fair, her fragrance rare,      | (xxx)xxx-xxxx            95015
  32. with woven webs for wayward flower.        |         I don't use no smileys
  33.